import 'dart:convert';

import 'package:dio/dio.dart';
import '/constant/app_info.dart';
import '/util/open_util.dart';

/// todo：使用gitee更新app
void giteeUpdateUtil() async{
  Dio dio = Dio();
  await dio.get("https://gitee.com/jrnet/getTest/raw/master/app.json").then((value) {
    if(int.parse(AppInfo.buildNumber!) < jsonDecode(value.data)["code"]){
      print("更新${jsonDecode(value.data)["path"]}");
      // OpenUrl.url(jsonDecode(value.data)["path"]);
    }
  });
}